arithmetic types (1) | basic_istream& operator>> (bool& val);basic_istream& operator>> (short& val);basic_istream& operator>> (unsigned short& val);basic_istream& operator>> (int& val);basic_istream& operator>> (unsigned int& val);basic_istream& operator>> (long& val);basic_istream& operator>> (unsigned long& val);basic_istream& operator>> (float& val);basic_istream& operator>> (double& val);basic_istream& operator>> (long double& val);basic_istream& operator>> (void*& val); |
---|---|
stream buffers (2) | basic_istream& operator>> (basic_streambuf<char_type,traits_type>* sb ); |
manipulators (3) | basic_istream& operator>> (basic_istream& (*pf)(basic_istream&));basic_istream& operator>> ( basic_ios<char_type,traits_type>& (*pf)(basic_ios<char_type,traits_type>&));basic_istream& operator>> (ios_base& (*pf)(ios_base&)); |
arithmetic types (1) | basic_istream& operator>> (bool& val);basic_istream& operator>> (short& val);basic_istream& operator>> (unsigned short& val);basic_istream& operator>> (int& val);basic_istream& operator>> (unsigned int& val);basic_istream& operator>> (long& val);basic_istream& operator>> (unsigned long& val);basic_istream& operator>> (long long& val);basic_istream& operator>> (unsigned long long& val);basic_istream& operator>> (float& val);basic_istream& operator>> (double& val);basic_istream& operator>> (long double& val);basic_istream& operator>> (void*& val); |
---|---|
stream buffers (2) | basic_istream& operator>> (basic_streambuf<char_type,traits_type>* sb ); |
manipulators (3) | basic_istream& operator>> (basic_istream& (*pf)(basic_istream&));basic_istream& operator>> ( basic_ios<char_type,traits_type>& (*pf)(basic_ios<char_type,traits_type>&));basic_istream& operator>> (ios_base& (*pf)(ios_base&)); |
>>
) applied to an input stream is known as extraction operator:false
). Then (if good), it calls num_get::get (using the stream's selected locale) to perform both the extraction and the parsing operations, adjusting the internal state flags accordingly. Finally, it destroys the sentry object before returning.false
). Then (if good), it extracts characters from its associated stream buffer object as if calling its member functions sbumpc or sgetc, and finally destroys the sentry object before returning.true
). Then (if good), it extracts characters from its associated stream buffer object as if calling its member functions sbumpc or sgetc, and finally destroys the sentry object before returning.pf(*this)
, where pf may be a manipulator.manipulator | Effect |
---|---|
ws | Extracts whitespaces. |
boolalpha/noboolalpha | Activates/deactivates the extraction of alphanumerical representations of values of type bool . |
skipws/noskipws | Activates/deactivates whether leading whitespaces are discarded before formatted input operations. |
dec/hex/oct | Sets that base used to interpret integral numerical values. |
manipulator | Effect |
---|---|
setbase | Sets the numerical base used to interpret integral numerical values. |
setiosflags/resetiosflags | Set/reset format flags. |
*this
).flag | error |
---|---|
eofbit | The input sequence has no more characters available (end-of-file reached). |
failbit | Either no characters were extracted, or the characters extracted could not be interpreted as a valid value of the appropriate type. For (2), it is set when no characters are inserted in the object pointed by sb, or when sb is a null pointer. |
badbit | Error on stream (such as when this function catches an exception thrown by an internal operation). When set, the integrity of the stream may have been affected. |
|
|